package com.zhongwang.mms.base;

import com.alibaba.excel.annotation.ExcelIgnore;
import lombok.Data;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;

/**
 * @Description: 数据表基类
 * @Date: 2020-3-25 14:37:36
 */
@Data
public class BaseModel implements Serializable {

    /**
     * 开始时间
     */
    @ExcelIgnore
    private Date startTime;

    /**
     * 结束时间
     */
    @ExcelIgnore
    private Date endTime;

    public void setEndTime(Date endTime) {
        if (endTime != null) {
            Calendar cal = Calendar.getInstance();
            cal.setTime(endTime);
            cal.add(Calendar.DAY_OF_YEAR, 1);
            this.endTime = cal.getTime();
        }
    }

    /**
     * 排序
     **/
    @ExcelIgnore
    private String sort;

    @ExcelIgnore
    private String order;

}
